package model.tokens;

import java.util.List;
import java.util.Stack;

import state.TabState;

import model.expression.AbstractExpression;
import model.parser.Parser;
import model.parser.ParserException;
import model.parser.ParsingData;

import expression.Expression;

public class AssignmentToken extends AbstractToken
{

    public AssignmentToken(String value, ParsingData parsingData) {}

	@Override
	public void convertToPostFix(Stack<AbstractToken> opStack,
			Stack<AbstractExpression> outStack, TabState ts,Stack<AbstractExpression> out) {
	}
    
	/**
	 * takes the right hand side of an equal sign and converts it into expressions.
	 * 
	 * currently toks contains only the rhs
	 */
	@Override
	public Stack<AbstractExpression> makeExpression(List<AbstractToken> toks,
			Stack<AbstractExpression> out, TabState ts, Parser temp)throws ParserException{
		
		if (toks.size()==0){
			//there is no right hand side
			return out;
		}else
			return toks.get(0).makeExpression(toks, out, ts, temp);
	}
   
}
